<?php

$status = I\App::Singleton()->getconfig('worktime', 'status');
foreach ($status as $key => $value) {
    if (!isset($one[$key])) {
        $one[$key] = 0;
    }
}

$total = array_sum($one);
$doing = 0;
foreach ($one as $key => $value) {
    if ($key < 30) {
        $doing += $value;
    }
}
$p     = 0;
if ($total > 0) {
    $p = 100 - intval($doing / $total * 10000) / 100;
}
?>
<td><?=$total?></td>
<td><?=$doing?></td>
<td><?=$one[30]?></td>
<td><?=$one[50]?></td>
<td><?=$one[60]?></td>
<td><?=$one[98]?></td>
<td class="left">
<?php $this->insert('progress', ['p' => $p])?>
</td>
